﻿import { IFileAttachment, ISysOrg, ISysGroup, ISysJobPosition } from '/@/views/fileattachment/api/interface'

export interface ISysPerson {
  ID?: string | null;
  Name: string | null;
  StaffNo: string | null;
  BirthDate: Date | null;
  Age: number | null;
  Gender: number | null | string;
  Ethnicity: number | null | string;
  HighestEducation: number | null;
  MajorCategory: string | null;
  MajorName: string | null;
  MaritalStatus: number | null;
  FertilityStatus: string | null;
  IsVeteran: boolean | null;
  VeteranCertificateId: null | string;
  VeteranCertificate?: IFileAttachment;
  PhotoId: null;
  Photo?: IFileAttachment;
  IdCardNo: string | null;
  IdCardFrontPhotoId: null;
  IdCardFrontPhoto?: IFileAttachment;
  IdCardBackPhotoId: null;
  IdCardBackPhoto?: IFileAttachment;
  HouseholdRegistration: string | null;
  NativePlace: string | null;
  PoliticalStatus: number | null;
  PartyJoinDate: Date | null;
  PartyBranch: string | null;
  ArchiveLocation: string | null;
  ArchiveNo: string | null;
  ArchiveTransferOutDate: Date | null;
  ArchiveTransferInDate: Date | null;
  HomeAddress: string | null;
  Phone: string | null;
  Email: string | null;
  SalaryBank: string | null;
  SalaryAccount: string | null;
  BonusBank: string | null;
  BonusAccount: string | null;
  OrgId: string | null;
  Org?: ISysOrg;
  GroupId: string | null;
  Group?: ISysGroup;
  JobPositionId: string | null;
  JobPosition?: ISysJobPosition;
  ResumeId: string | null;
  Resume?: IFileAttachment;
  HireDate: Date | null;
  ConfirmationDate: Date | null;
  EmploymentType: number | null;
  ContractType: number | null;
  ContractNo: string | null;
  ContractStartDate: Date | null;
  ContractEndDate: Date | null;
  ResignationDate: Date | null;
  ResignationReason: string | null;
  ResignationType: number | null;
  State: '在职' | '离职' | '退休' | null;
  BloodType: number | null;
  Hobbies: string | null
  IdCardExpiryDate: Date | null;
  JoinWorkDate: Date | null; // 入职日期
  ArchiveAgeDate: Date | null; // 档案年龄日期
  Order: number | null;
  WorkYears: number | null; // 工龄（支持小数，如1.5年）
  CompanyYears: number | null; // 司龄（支持小数，如1.5年）
}

export interface ISysPersonVm {
  Entity: ISysPerson;

}

export interface ISysPersonView extends ISysPerson {

}

export interface ISysPersonQuery {
  Name?: string
  StaffNo?: string
  BirthDate?: Date
  AgeStart?: number
  AgeEnd?: number
  Gender?: number
  Ethnicity?: number
  HighestEducation?: number
  MaritalStatus?: number
  IdCardNo?: string
  HouseholdRegistration?: string
  NativePlace?: string
  PoliticalStatus?: number
  ArchiveLocation?: string
  HomeAddress?: string
  Phone?: string
  OrgId?: string
  GroupId?: string
  JobPositionId?: string
  HireDate?: Date
  EmploymentType?: number
  ContractType?: number
  ContractNo?: string
  State?: '在职' | '试用期' | '离职' | '退休' | null
  BloodType?: number
  IsVeteran?: boolean
  WorkYearsStart?: number
  WorkYearsEnd?: number
  CompanyYearsStart?: number
  CompanyYearsEnd?: number
}
